
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/views/layout/Layout'

/** note: Submenu only appear when children.length>=1
 *  detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 **/

/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirect in the breadcrumb
* name:'router-name'             the name is used by <keep-alive> (must set!!!)
* meta : {
    perms: ['GET /aaa','POST /bbb']     will control the page perms (you can set multiple perms)
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
    noCache: false                if true ,the page will no be cached(default is false)
  }
**/
export const constantRouterMap = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path*',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    path: '/auth-redirect',
    component: () => import('@/views/login/authredirect'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/errorPage/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/errorPage/401'),
    hidden: true
  },
  {
    path: '',
    component: Layout,
    redirect: 'dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
        name: 'sysManage',
        meta: { title: 'System_home_page', icon: 'sysManage', noCache: false }
      }
    ]
  }
]

export default new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
})


export const asyncRouterMap = [
  {
    path: '/shop',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'shopManage',
    meta: {
      title: 'Store_management',
      icon: 'shop'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/shop/list'),
        name: 'ShopList',
        meta: {
          perms: ['GET /admin/p/store_store_index'],
          title: 'Store_management',
          noCache: false
        }
      },
      {
        path: 'edit',
        component: () => import('@/views/shop/edit'),
        name: 'ShopEdit',
        meta: {
          perms: ['GET /admin/p/store_store_edit'],
          title: 'Edit_stores',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'overview',
        component: () => import('@/views/shop/overview'),
        name: 'overviewShop',
        meta: {
          perms: ['GET /admin/p/store_store_detail'],
          title: 'Store_details',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'create',
        component: () => import('@/views/shop/create'),
        name: 'createShop',
        meta: {
          perms: ['GET /admin/p/store_store_add'],
          title: 'Add_store',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'admin',
        component: () => import('@/views/shop/admin'),
        name: 'shopAdmin',
        meta: {
          perms: ['GET /admin/p/store_user_index'],
          title: 'Store_partners',
          noCache: false
        }
      },

      {
        path: 'admin/edit',
        component: () => import('@/views/sys/admin/edit'),
        name: 'sysAdminEdit',
        meta: {
          perms: ['GET /admin/p/store_user_edit'],
          title: 'Edit_controllers',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'admin/create',
        component: () => import('@/views/sys/admin/create'),
        name: 'sysAdminCreate',
        meta: {
          perms: ['GET /admin/p/store_user_add'],
          title: 'Add_controllers',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'logs',
        component: () => import('@/views/shop/log'),
        name: 'ShopLog',
        meta: {
          perms: ['GET /admin/p/store_oplog_index'],
          title: 'Store_operation_journals',
          noCache: false
        }
      },

      {
        path: 'account_book',
        component: () => import('@/views/shop/accountBook/list'),
        name: 'bookAccountList',
        meta: {
          perms: ['GET /admin/p/store_accountbook_index'],
          title: 'Account_book_management',
          noCache: false
        }
      },
      {
        path: 'account_book/detail',
        component: () => import('@/views/shop/accountBook/detail'),
        name: 'bookAccountDetail',
        meta: {
          perms: ['GET /admin/p/store_accountbook_detail'],
          title: 'Account_book_detail',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'handover/list',
        component: () => import('@/views/shop/handover/list'),
        name: 'handoverList',
        meta: {
          perms: ['GET /admin/p/store_handover_index'],
          title: 'Handover_management',
          noCache: false
        }
      },
      {
        path: 'handover/detail',
        component: () => import('@/views/shop/handover/detail'),
        name: 'handoverDetail',
        meta: {
          perms: ['GET /admin/p/store_handover_detail'],
          title: 'Handover_detail',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'calculateSettlementList',
        component: () => import('@/views/shop/calculateSettlementList'),
        name: 'calculateSettlementList',
        meta: {
          title: '日中结算',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'abnormalSettlement',
        component: () => import('@/views/shop/abnormalSettlement'),
        name: 'abnormalSettlement',
        meta: {
          title: '下班结算',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'recharge',
        component: () => import('@/views/shop/recharge'),
        name: 'recharge',
        meta: {
          perms: ['GET /admin/p/store_user_index'],
          title: '充值管理',
          noCache: false
        }
      },
      {
        path: 'recharge/rechargeDetail',
        component: () => import('@/views/shop/order/rechargeDetail'),
        name: 'rechargeDetail',
        meta: {
          perms: ['GET /admin/p/store_accountbook_detail'],
          title: '充值详情',
          noCache: false
        },
        hidden: true
      },
    ]
  },
  {
    path: '/Distribution',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'distribution',
    meta: {
      title: '分销管理',
      icon: 'distribution'
    },
    children: [
      {
        path: 'statistics',
        component: () => import('@/views/Distribution/statistics'),
        name: 'DistributionStatistics',
        meta: {
          perms: ['GET /admin/p/reward_distribution_log_statistic'],
          title: '分销统计',
          noCache: false
        },
      },
      {
        path: 'reward',
        component: () => import('@/views/Distribution/reward'),
        name: 'DistributionReward',
        meta: {
          perms: ['GET /admin/p/reward_distribution_index'],
          title: '奖励规则',
          noCache: false
        },
      },
      {
        path: 'RuleConfig',
        component: () => import('@/views/Distribution/RuleConfig'),
        name: 'RuleConfig',
        meta: {
          perms: ['GET /admin/p/reward_distribution_config'],
          title: '规则配置',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'detailed',
        component: () => import('@/views/Distribution/detailed'),
        name: 'detailed',
        meta: {
          perms: ['GET /admin/p/reward_distribution_log_index'],
          title: '分销明细',
          noCache: false
        },
      },
    ]
  },
  {
    path: '/goods',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'goodsManage',
    meta: {
      title: 'Merchandise_management',
      icon: 'goodsManage'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/goods/list'),
        name: 'GoodsList',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: 'Goods_list',
          noCache: false
        }
      },
      {
        path: 'package',
        component: () => import('@/views/goods/package'),
        name: 'PackageList',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: '套餐管理',
          noCache: false
        }
      },
      {
        path: 'createPackage',
        component: () => import('@/views/goods/createPackage'),
        name: 'createPackage',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: '套餐管理添加',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'detailPackage',
        component: () => import('@/views/goods/detailPackage'),
        name: 'detailPackage',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: '套餐管理详情',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'shop_list',
        component: () => import('@/views/goods/shopList'),
        name: 'goodsShopList',
        meta: {
          perms: ['GET /admin/p/goods_storegoods_index'],
          title: 'Goods_shop_list',
          noCache: false
        }
      },
      {
        path: 'create',
        component: () => import('@/views/goods/create'),
        name: 'GoodsCreate',
        meta: {
          perms: ['GET /admin/p/goods_goods_add', 'GET /admin/p/goods_storegoods_add'],
          title: 'Add_Goods',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'edit',
        component: () => import('@/views/goods/detail'),
        name: 'GoodsEdit',
        meta: {
          perms: ['GET /admin/p/goods_goods_detail', 'GET /admin/p/goods_storegoods_detail'],
          title: 'Edit_merchandies',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'detail',
        component: () => import('@/views/goods/detail'),
        name: 'GoodsDetail',
        meta: {
          perms: ['GET /admin/p/goods_goods_detail', 'GET /admin/p/goods_storegoods_detail'],
          title: 'Merchandise_details',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'category',
        component: () => import('@/views/goods/category'),
        name: 'Category',
        meta: {
          perms: ['GET /admin/p/goods_category_index'],
          title: 'Merchandise_category',
          noCache: false
        }
      },
      {
        path: 'logs',
        component: () => import('@/views/goods/logs'),
        name: 'GoodsLogs',
        meta: {
          perms: ['GET /admin/p/goods_oplog_index'],
          title: 'Merchandise_operation_journals',
          noCache: false
        }
      }
    ]
  },

  {
    path: '/formula',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'formulaManage',
    meta: {
      title: '配方管理',
      icon: 'goodsManage'
    },
    children: [
      {
        path: 'formulaList',
        component: () => import('@/views/formula/formulaList'),
        name: 'formulaList',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: '配方管理',
          noCache: true
        }
      },
      {
        path: 'formulaTypeList',
        component: () => import('@/views/formula/formulaTypeList'),
        name: 'formulaTypeList',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: '配方类型管理',
          noCache: false
        }
      },

      {
        path: 'formulaSpecifications',
        component: () => import('@/views/formula/formulaSpecifications'),
        name: 'formulaSpecifications',
        meta: {
          perms: ['GET /admin/p/goods_goods_index'],
          title: '添加规格',
          noCache: false
        },
        hidden: true
      },

    ]
  },

  {
    path: '/order',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'order',
    meta: {
      title: 'Tickets_management',
      icon: 'order'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/order/list'),
        name: 'orderList',
        meta: {
          perms: ['GET /admin/p/order_order_index'],
          title: 'Tickets_list',
          noCache: false
        },
      },
      {
        path: 'detail',
        component: () => import('@/views/order/detail'),
        name: 'orderDetail',
        meta: {
          perms: ['GET /admin/p/order_order_index'],
          title: 'Order_details',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'print',
        component: () => import('@/views/order/print'),
        name: 'orderPrint',
        meta: {
          perms: ['GET /admin/p/order_order_index'],
          title: 'Print_order',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'refund',
        component: () => import('@/views/order/refund'),
        name: 'orderRefund',
        meta: {
          perms: ['GET /admin/p/order_orderrefund_index'],
          title: '订单退款',
          noCache: false
        },
      },
      {
        path: 'agent_refund',
        component: () => import('@/views/order/agentRefund'),
        name: 'orderAgentRefund',
        meta: {
          perms: ['GET /admin/p/order_orderagentrefund_index'],
          title: '订单待退款',
          noCache: false
        },
      },
      {
        path: 'refund_details',
        component: () => import('@/views/order/refundDetails'),
        name: 'refundDetails',
        meta: {
          perms: ['GET /admin/p/order_orderagentrefund_index', 'GET /admin/p/order_orderagentrefund_index'],
          title: '退款详情',
          noCache: false
        },
        hidden: true
      }
    ]
  },
  {
    path: '/repository',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'repository',
    meta: {
      title: 'Stock_management',
      icon: 'repository'
    },
    children: [
      //总店库存
      {
        path: '/master_inventory',
        component: () => import('@/views/material/masterInventory'),
        name: 'masterInventory',
        meta: {
          perms: ['GET /admin/p/stock_productapply_index'],
          title: '总部原料库存',
          noCache: false
        }
      },
      //门店申请
      {
        path: '/branch_application',
        component: () => import('@/views/material/branchApplication'),
        name: 'branchApplication',
        meta: {
          perms: ['GET /admin/p/stock_productapply_index'],
          title: '门店原料申请',
          noCache: false
        }
      },
      {
        path: 'merchandise_applay',
        component: () => import('@/views/material/applayList'),
        name: 'Merchandise',
        meta: {
          perms: ['GET /admin/p/stock_productapply_index'],
          title: 'Restock_request',
          noCache: false
        }
      },
      {
        path: 'merchandise/list',
        component: () => import('@/views/material/list'),
        name: 'merchandiseList',
        meta: {
          perms: ['GET /admin/p/stock_product_index'],
          title: 'Merchandise_list',
          noCache: false
        }
      },
      {
        path: 'list',
        component: () => import('@/views/shop/order/list'),
        name: 'ShopOrderList',
        meta: {
          perms: ['GET /admin/p/stock_stockin_index'],
          title: 'Warehousing_of_goods',
          noCache: false
        }
      },
      {
        path: 'order/detail',
        component: () => import('@/views/shop/order/detail'),
        name: 'ShopOrderDetail',
        meta: {
          perms: ['GET /admin/p/stock_stockin_index'],
          title: 'Store_ticket_processing',
          noCache: false
        },
        hidden: true
      },

      {
        path: 'merchandise/shop_list',
        component: () => import('@/views/material/shopList'),
        name: 'merchandiseShopList',
        meta: {
          perms: ['GET /admin/p/stock_storeproduct_index'],
          title: 'Merchandise_store_list',
          noCache: false
        }
      },
      {
        path: 'apply',
        component: () => import('@/views/material/apply'),
        name: 'apply',
        meta: {
          perms: ['GET /admin/p/stock_productapply_index'],
          title: 'Add_Products',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'create',
        component: () => import('@/views/repository/create'),
        name: 'repositoryCreate',
        meta: {
          perms: ['GET /admin/p/stock_productapply_index'],
          title: 'Add_Products',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'edit',
        component: () => import('@/views/repository/edit'),
        name: 'repositoryEdit',
        meta: {
          perms: ['GET /admin/p/stock_productapply_index'],
          title: 'Product_details',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'shopCheck/list',
        component: () => import('@/views/shop/check/list'),
        name: 'ShopCheck',
        meta: {
          perms: ['GET /admin/p/stock_storecheck_index'],
          title: 'Shop_check',
          noCache: false
        }
      },
      {
        path: 'shopCheck/add',
        component: () => import('@/views/shop/check/add'),
        name: 'ShopCheckAdd',
        meta: {
          perms: ['GET /admin/p/stock_storecheck_index'],
          title: 'Shop_check_add',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'shopCheck/detail',
        component: () => import('@/views/shop/check/detail'),
        name: 'shopCheckDetail',
        meta: {
          perms: ['GET /admin/p/stock_storecheck_index'],
          title: 'Shop_check_detail',
          noCache: false
        },
        hidden: true
      },

      /**
       * 原料分类
       */
      {
        path: 'repository/materialClassification/list',
        component: () => import('@/views/repository/materialClassification/list'),
        name: 'materialClassificationList',
        meta: {
          perms: ['GET /admin/p/stock_storecheck_index'],
          title: '原料分类',
          noCache: false
        },
      }
    ]
  },
  {
    path: '/user',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'userManage',
    meta: {
      perms: ['GET /admin/p/member_member_index', 'GET /admin/p/member_address_index', 'GET /admin/p/member_accountdetail_index', 'GET /admin/p/member_collection_index', 'GET /admin/p/member_footmark_index', 'GET /admin/p/member_searchhistory_index', 'GET /admin/p/member_level_index'],
      title: 'User_management',
      icon: 'userManage'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/user/user'),
        name: 'User',
        meta: {
          perms: ['GET /admin/p/member_member_index'],
          title: 'Member_management',
          noCache: false
        }
      },

      {
        path: 'MemberLevelSetting',
        component: () => import('@/views/user/MemberLevelSetting'),
        name: 'MemberLevelSetting',
        meta: {
          perms: ['GET /admin/p/member_level_index'],
          title: '会员等级设置',
          noCache: false
        }
      },
      {
        path: 'MemberLevelSetting/addedUser',
        component: () => import('@/views/user/addedUser'),
        name: 'addedUser',
        meta: {
          perms: ['GET /admin/p/member_level_add'],
          title: '设置会员等级',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'PaidMemberSettings',
        component: () => import('@/views/user/PaidMemberSettings'),
        name: 'PaidMemberSettings',
        meta: {
          perms: ['GET /admin/p/member_pay_index'],
          title: '付费会员设置',
          noCache: false
        }
      },
      {
        path: 'PaidMemberSettings/addedPaidUser',
        component: () => import('@/views/user/addedPaidUser'),
        name: 'addedPaidUser',
        meta: {
          perms: ['GET /admin/p/member_pay_add'],
          title: '设置付费会员',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'PaidMemberList',
        component: () => import('@/views/user/PaidMemberList'),
        name: 'PaidMemberList',
        meta: {
          perms: ['GET /admin/p/member_pay_user_index'],
          title: '付费会员列表',
          noCache: false
        }
      },
      {
        path: 'PaidMemberRecord',
        component: () => import('@/views/user/PaidMemberRecord'),
        name: 'PaidMemberRecord',
        meta: {
          perms: ['GET /admin/p/member_member_index'],
          title: '付费会员购买记录',
          noCache: false
        },

      },
      {
        path: 'UserMessage',
        component: () => import('@/views/user/message/PaidMessage'),
        name: 'UserMessage',
        meta: {
          perms: ['GET /admin/p/member_level_notify_config', 'GET /admin/p/member_pay_notify_config'],
          title: '系统消息',
          noCache: false
        },
        children: [
          {
            path: 'SystemMessage',
            component: () => import('@/views/user/message/PaidMessage'),
            name: 'SystemMessage',
            meta: {
              perms: ['GET /admin/p/member_level_notify_config'],
              title: '等级会员到期提醒',
              noCache: false
            }
          },
          {
            path: 'PaidMessage',
            component: () => import('@/views/user/message/PaidMessage?id=1'),
            name: 'PaidMessage',
            meta: {
              perms: ['GET /admin/p/member_pay_notify_config'],
              title: '付费会员到期提醒',
              noCache: false
            },
          },
        ]
      },
      // {
      //   path: 'SystemMessage',
      //   component: () => import('@/views/user/PaidMessage'),
      //   name: 'SystemMessage',
      //   meta: {
      //     perms: ['GET /admin/p/member_member_index'],
      //     title: '等级会员到期提醒',
      //     noCache: false
      //   }
      // },
      {
        path: 'overview',
        component: () => import('@/views/user/overview'),
        name: 'userOverview',
        meta: {
          perms: ['GET /admin/p/member_member_index'],
          title: '用户信息',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'address',
        component: () => import('@/views/user/address'),
        name: 'UserAddress',
        meta: {
          perms: ['GET /admin/p/member_address_index'],
          title: 'Receiving_Address',
          noCache: false
        }
      },
      {
        path: 'bill',
        component: () => import('@/views/user/bill'),
        name: 'userBill',
        hidden: true,
        meta: {
          perms: ['GET /admin/p/member_accountdetail_index'],
          title: '账户明细',
          noCache: false
        }

      },
      {
        path: 'collect',
        component: () => import('@/views/user/collect'),
        name: 'Collect',
        meta: {
          perms: ['GET /admin/p/member_collection_index'],
          title: 'Members_collection',
          noCache: false
        }
      },
      {
        path: 'footprint',
        component: () => import('@/views/user/footprint'),
        name: 'FootPrint',
        meta: {
          perms: ['GET /admin/p/member_footmark_index'],
          title: 'Member_tracking',
          noCache: false
        }
      },
      {
        path: 'history',
        component: () => import('@/views/user/history'),
        name: 'History',
        meta: {
          perms: ['GET /admin/p/member_searchhistory_index'],
          title: 'Search_history',
          noCache: false
        }
      }
    ]
  },
  {
    path: '/subscribe',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'subscribe',
    meta: {
      title: '订阅管理',
      icon: 'subscribe'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/subscribe/list'),
        name: 'subscribeList',
        meta: {
          perms: ['GET /admin/p/lumiere_subscribe_index'],
          title: '订阅配置列表',
          noCache: false
        },
      },
      {
        path: 'add',
        component: () => import('@/views/subscribe/add'),
        name: 'subscribeAdd',
        meta: {
          perms: ['GET /admin/p/lumiere_subscribe_add'],
          title: '订阅配置',
          noCache: false
        },
        hidden: true,
      },
      {
        path: 'userList',
        component: () => import('@/views/subscribe/users'),
        name: 'subscribeUsers',
        meta: {
          perms: ['GET /admin/p/lumiere_subscribe_user_index'],
          title: '订阅用户',
          noCache: false
        },
      },
      {
        path: 'userLog',
        component: () => import('@/views/subscribe/userLog'),
        name: 'subscribeUserLog',
        meta: {
          perms: ['GET /admin/p/lumiere_subscribe_user_log_index'],
          title: '订阅记录',
          noCache: false
        },
      },
      {
        path: 'subscribeOrder',
        component: () => import('@/views/subscribe/order'),
        name: 'subscribeOrder',
        meta: {
          perms: ['GET /admin/p/lumiere_subscribe_order_index'],
          title: '订阅订单',
          noCache: false
        },
      },
      {
        path: 'subscribeDetail',
        component: () => import('@/views/subscribe/detail'),
        name: 'subscribeDetail',
        meta: {
          perms: ['GET /admin/p/lumiere_subscribe_order_detail'],
          title: '订阅订单详情',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'statistic',
        component: () => import('@/views/subscribe/statistic'),
        name: 'subscribeStatistic',
        meta: {
          perms: ['GET /admin/p/lumiere_statistic_list'],
          title: '订阅统计',
          noCache: false
        },
      }, {
        path: 'typeStatisticDetail',
        component: () => import('@/views/subscribe/typeStatisticDetail'),
        name: 'subscribeTypeStatisticDetail',
        meta: {
          perms: ['GET /admin/lumiere/subscribeUser/index'],
          title: '订阅分类详情',
          noCache: false
        },
        hidden: true
      }
    ]
  },
  {
    path: '/promotion',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'promotionManage',
    meta: {
      perms: ['GET /admin/p/card_virtual_index', 'GET /admin/p/card_entity_index'],
      title: '礼物卡管理',
      icon: 'promotionManage'
    },
    children: [
      {
        path: 'VirtualCardManagement',
        component: () => import('@/views/gift/VirtualCardManagement'),
        name: 'VirtualCardManagement',
        meta: {
          perms: ['GET /admin/p/card_virtual_index'],
          title: '虚拟卡管理',
          noCache: false
        }
      },
      {
        path: 'VirtualCardStatics',
        component: () => import('@/views/gift/VirtualCardStatics'),
        name: 'VirtualCardStatics',
        meta: {
          perms: ['GET /admin/p/card_virtual_statistic_list'],
          title: '虚拟卡统计',
          noCache: false
        },
      },
      // {
      //   path: 'couponDetail',
      //   component: () => import('@/views/promotion/couponDetail'),
      //   name: 'couponDetail',
      //   meta: {
      //     perms: ['GET /admin/p/activity_coupon_index'],
      //     title: '优惠券详情',
      //     noCache: false
      //   },
      //   hidden: true
      // },
      {
        path: 'giftcard',
        component: () => import('@/views/gift/list'),
        name: 'giftcard',
        meta: {
          perms: ['GET /admin/p/card_entity_index'],
          title: '实物卡管理',
          noCache: false
        },
      },
      {
        path: 'cardStatistics',
        component: () => import('@/views/gift/cardStatistics'),
        name: 'cardStatistics',
        meta: {
          perms: ['GET /admin/p/card_entity_statistic_list'],
          title: '实物卡统计',
          noCache: false
        },
      },
      {
        path: 'cardStatistics/cardStatisticsdetail',
        component: () => import('@/views/gift/cardStatisticsdetail'),
        name: 'cardStatisticsdetail',
        meta: {
          perms: ['GET /admin/p/card_entity_statistic_list'],
          title: '实物卡统计详情',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'cardStatistics/cardStatisticsdetail/details',
        component: () => import('@/views/gift/cardStatisticsdetails'),
        name: 'cardStatisticsdetails',
        meta: {
          perms: ['GET /admin/p/card_entity_statistic_list'],
          title: '实物卡明细',
          noCache: false
        },
        hidden: true
      },
      //

      {
        path: 'VirtualCardStatics/detail',
        component: () => import('@/views/gift/VirtualCardStaticsdetail'),
        name: 'VirtualCardStaticsdetail',
        meta: {
          perms: ['GET /admin/p/card_virtual_statistic_list'],
          title: '虚拟卡统计详情',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'VirtualCardStatics/detail/details',
        component: () => import('@/views/gift/VirtualCardStaticsdetails'),
        name: 'VirtualCardStaticsdetails',
        meta: {
          perms: ['GET /admin/p/card_virtual_statistic_list'],
          title: '虚拟卡明细',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'giftcard/create',
        component: () => import('@/views/gift/create'),
        name: 'giftcardCreate',
        meta: {
          perms: ['GET /admin/p/activity_giftcard_index'],
          title: '礼物卡添加',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'giftcardClassification',
        component: () => import('@/views/gift/cardClassification'),
        name: 'giftcardClassification',
        meta: {
          perms: ['GET /admin/p/activity_giftcard_index'],
          title: '礼物卡分类',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'giftcard/edit',
        component: () => import('@/views/gift/edit'),
        name: 'giftCardEdit',
        meta: {
          perms: ['GET /admin/p/activity_giftcard_index'],
          title: '礼物卡编辑',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'giftcard/detail',
        component: () => import('@/views/gift/detail'),
        name: 'giftcardDetail',
        meta: {
          perms: ['GET /admin/p/activity_giftcard_index'],
          title: '礼物卡详情',
          noCache: false
        },
        hidden: true
      },
      /*{
        path: 'topic',
        component: () => import('@/views/promotion/topic'),
        name: 'topic',
        meta: {
          perms: ['GET /admin/topic/list', 'POST /admin/topic/create', 'GET /admin/topic/read', 'POST /admin/topic/update', 'POST /admin/topic/delete'],
          title: '专题管理',
          noCache: false
        }
      },
      {
        path: 'topic-create',
        component: () => import('@/views/promotion/topicCreate'),
        name: 'topicCreate',
        meta: {
          perms: ['POST /admin/topic/create'],
          title: '专题创建',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'topic-edit',
        component: () => import('@/views/promotion/topicEdit'),
        name: 'topicEdit',
        meta: {
          perms: ['GET /admin/topic/read', 'POST /admin/topic/update'],
          title: '专题编辑',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'groupon-rule',
        component: () => import('@/views/promotion/grouponRule'),
        name: 'grouponRule',
        meta: {
          perms: ['GET /admin/groupon/list', 'POST /admin/groupon/create', 'POST /admin/groupon/update', 'POST /admin/groupon/delete'],
          title: '团购规则',
          noCache: false
        }
      },
      {
        path: 'groupon-activity',
        component: () => import('@/views/promotion/grouponActivity'),
        name: 'grouponActivity',
        meta: {
          perms: ['GET /admin/groupon/listRecord'],
          title: '团购活动',
          noCache: false
        }
      }*/
    ]
  },
  {
    path: '/coupon',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'couponManage',
    meta: {
      perms: ['GET /admin/p/coupon_elec_index', 'GET /admin/p/coupon_entity_index', 'GET /admin/p/coupon_exten_index', 'GET /admin/p/coupon_exten_index'],
      title: '优惠券管理',
      icon: 'couponManage'
    },
    children: [
      {
        path: 'allCoupon',
        component: () => import('@/views/coupon/allCoupon'),
        name: 'allCoupon',
        meta: {
          perms: ['GET /admin/p/coupon_all_index'],
          title: '优惠券列表',
          noCache: false
        }
      },
      {
        path: 'strategyCoupon',
        component: () => import('@/views/coupon/strategyCoupon'),
        name: 'strategyCoupon',
        meta: {
          perms: ['GET /admin/p/coupon_strategy_index'],
          title: '优惠券策略',
          noCache: false
        }
      },
      {
        path: 'strategyCouponStatistic',
        component: () => import('@/views/coupon/strategyCouponStatistic'),
        name: 'strategyCouponStatistic',
        meta: {
          perms: ['GET /admin/p/coupon_strategy_Statistic'],
          title: '策略统计',
          noCache: false,
        },
        hidden: true
      },
      {
        path: 'couponStatistic',
        component: () => import('@/views/coupon/couponStatistic'),
        name: 'couponStatistic',
        meta: {
          perms: ['GET /admin/p/coupon_Statistic'],
          title: '优惠券策略统计',
          noCache: false,
        }
      },
      {
        path: 'couponStatisticDetail',
        component: () => import('@/views/coupon/couponStatisticDetail'),
        name: 'couponStatisticDetail',
        meta: {
          perms: ['GET /admin/p/coupon_Statistic_Detail'],
          title: '优惠券策略统计详情',
          noCache: false,
        },
        hidden: true
      },
      /*  {
          path: 'elecCoupon',
          component: () => import('@/views/coupon/elecCoupon'),
          name: 'elecCoupon',
          meta: {
            perms: ['GET /admin/p/coupon_elec_index', 'GET /admin/p/coupon_elec_add', 'GET /admin/p/coupon_elec_detail',
              'GET /admin/p/coupon_elec_edit', 'GET /admin/p/coupon_elec_delete', 'GET /admin/p/coupon_elec_statistic',
              'GET /admin/p/coupon_elec_status'],
            title: '电子优惠券',
            noCache: false
          }
        },
        {
          path: 'entityCoupon',
          component: () => import('@/views/coupon/entityCoupon'),
          name: 'entityCoupon',
          meta: {
            perms: ['GET /admin/p/coupon_entity_index', 'GET /admin/p/coupon_entity_add', 'GET /admin/p/coupon_entity_detail',
              'GET /admin/p/coupon_entity_edit', 'GET /admin/p/coupon_entity_delete', 'GET /admin/p/coupon_entity_statistic',
              'GET /admin/p/coupon_entity_status'],
            title: '实体优惠券',
            noCache: false
          }
        },
        {
          path: 'extenCoupon',
          component: () => import('@/views/coupon/extenCoupon'),
          name: 'extenCoupon',
          meta: {
            perms: ['GET /admin/p/coupon_exten_index'],
            title: '推广优惠券',
            noCache: false
          }
        },
        {
          path: 'elecCouponCreate',
          component: () => import('@/views/coupon/elecCouponCreate'),
          name: 'elecCouponCreate',
          meta: {
            perms: ['GET /admin/p/coupon_elec_edit', 'GET /admin/p/coupon_elec_add'],
            title: '增加/编辑电子优惠券',
            noCache: false,
          },
          hidden: true
        },
        {
          path: 'entityCouponCreate',
          component: () => import('@/views/coupon/entityCouponCreate'),
          name: 'entityCouponCreate',
          meta: {
            perms: ['GET /admin/p/coupon_entity_edit'],
            title: '增加/编辑实体优惠券',
            noCache: false,
          },
          hidden: true
        },
        {
          path: 'extenCouponCreate',
          component: () => import('@/views/coupon/extenCouponCreate'),
          name: 'extenCouponCreate',
          meta: {
            perms: ['GET /admin/p/coupon_exten_edit'],
            title: '增加/编辑推广优惠券',
            noCache: false,
          },
          hidden: true
        },
         {
           path: 'elecCouponStatistic',
           component: () => import('@/views/coupon/elecCouponStatistic'),
           name: 'elecCouponStatistic',
           meta: {
             perms: [, 'GET /admin/p/coupon_elec_statistic'],
             title: '统计电子优惠券',
             noCache: false,
           },
           hidden: true
         },
         {
           path: 'entityCouponStatistic',
           component: () => import('@/views/coupon/entityCouponStatistic'),
           name: 'entityCouponStatistic',
           meta: {
             perms: ['GET /admin/p/coupon_entity_index'],
             title: '统计实体优惠券',
             noCache: false,
           },
           hidden: true
         },
         {
           path: 'extenCouponStatistic',
           component: () => import('@/views/coupon/extenCouponStatistic'),
           name: 'extenCouponStatistic',
           meta: {
             perms: ['GET /admin/p/coupon_exten_index'],
             title: '统计推广优惠券',
             noCache: false,
           },
           hidden: true
         },
         {
           path: 'elecCouponDetail',
           component: () => import('@/views/coupon/elecCouponDetail'),
           name: 'elecCouponDetail',
           meta: {
             perms: ['GET /admin/p/coupon_elec_detail'],
             title: '电子优惠券详情',
             noCache: false,
           },
           hidden: true
         },
         {
           path: 'entityCouponDetail',
           component: () => import('@/views/coupon/entityCouponDetail'),
           name: 'entityCouponDetail',
           meta: {
             perms: ['GET /admin/p/coupon_entity_index'],
             title: '实体优惠券详情',
             noCache: false,
           },
           hidden: true
         },
         {
           path: 'extenCouponDetail',
           component: () => import('@/views/coupon/extenCouponDetail'),
           name: 'extenCouponDetail',
           meta: {
             perms: ['GET /admin/p/coupon_exten_index'],
             title: '统计优惠券详情',
             noCache: false,
           },
           hidden: true
         },
         {
           path: 'couponStatistic',
           component: () => import('@/views/coupon/statistic'),
           name: 'couponStatistic',
           meta: {
             perms: ['GET /admin/p/coupon_exten_index'],
             title: '优惠券统计',
             noCache: false,
           },
         },
         {
           path: 'typeStatisticDetail',
           component: () => import('@/views/coupon/typeStatisticDetail'),
           name: 'couponTypeStatisticDetail',
           meta: {
             perms: ['GET /admin/lumiere/subscribeUser/index'],
             title: '优惠券分类详情',
             noCache: false
           },
           hidden: true
         }*/
    ],
  },
  {
    path: '/exchange',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: '积分兑换管理',
    meta: {
      title: '积分兑换管理',
      icon: 'points'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/exchange/list'),
        name: 'ExchangePoint',
        meta: {
          perms: ['GET /admin/p/point_exchange_index'],
          title: '积分兑换列表',
          noCache: false
        }
      },
      {
        path: 'add',
        component: () => import('@/views/exchange/add'),
        name: 'pointExchangeAdd',
        meta: {
          perms: ['GET /admin/p/point_exchange_add'],
          title: '积分兑换添加',
          noCache: false
        },
        hidden: true,
      },
      {
        path: 'exchangeStatistic',
        component: () => import('@/views/exchange/statistic'),
        name: 'exchangeStatistic',
        meta: {
          perms: ['GET /admin/p/point_exchange_statistic'],
          title: '积分兑换统计',
          noCache: false
        },
        hidden: false,
      },
      {
        path: 'typeStatisticDetail',
        component: () => import('@/views/exchange/typeStatisticDetail'),
        name: 'exchangeTypeStatisticDetail',
        meta: {
          perms: ['GET /admin/p/point_exchange_statistic'],
          title: '积分兑换明细',
          noCache: false
        },
        hidden: true,
      },
    ]
  },
  {
    path: '/statistics',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'statistics',
    meta: {
      perms: ['GET /admin/p/statistics_goods_index', 'GET /admin/p/statistics_member_index', 'GET /admin/p/statistics_sale_index', 'GET /admin/p/statistics_productsum_index', 'GET /admin/p/statistics_storeproduct_index', 'GET /admin/p/statistics_ordersum_index', 'GET /admin/p/statistics_storeorder_index'],
      title: 'Data_analysis',
      icon: 'statistics'
    },
    children: [
      /*      {
              path: 'order',
              component: () => import('@/views/statistics/order'),
              name: 'orderStatistics',
              meta: {
                perms: ['GET /admin/admin/list', 'POST /admin/admin/create', 'POST /admin/admin/update', 'POST /admin/admin/delete'],
                title: '订单统计',
                noCache: false
              }
            },*/
      {
        path: 'goods',
        component: () => import('@/views/statistics/goods'),
        name: 'goodsStatistics',
        meta: {
          perms: ['GET /admin/p/statistics_goods_index'],
          title: 'Merchandise_data',
          noCache: false
        }
      },
      {
        path: 'user',
        component: () => import('@/views/statistics/user'),
        name: 'userStatistics',
        meta: {
          perms: ['GET /admin/p/statistics_member_index'],
          title: 'User_data',
          noCache: false
        }
      },
      {
        path: 'sales',
        component: () => import('@/views/statistics/sales'),
        name: 'salesStatistics',
        meta: {
          perms: ['GET /admin/p/statistics_sale_index'],
          title: 'Sales_data',
          noCache: false
        }
      },
      {
        path: 'material_summary_statistics',
        component: () => import('@/views/statistics/material/material_summary_statistics'),
        name: 'materialSummaryStatistics',
        meta: {
          perms: ['GET /admin/p/statistics_productsum_index'],
          title: 'Material_summary_statistics',
          noCache: false
        }
      },
      {
        path: 'material_statistics',
        component: () => import('@/views/statistics/material/material_statistics'),
        name: 'materialStatistics',
        meta: {
          perms: ['GET /admin/p/statistics_storeproduct_index'],
          title: 'Material_statistics',
          noCache: false
        }
      },
      {
        path: 'order_summary_statistics',
        component: () => import('@/views/statistics/order/statistics_summary'),
        name: 'orderSummaryStatistic',
        meta: {
          perms: ['GET /admin/p/statistics_ordersum_index'],
          title: 'Order_summary_statistics',
          noCache: false
        }
      },
      {
        path: 'order_statistics_day',
        component: () => import('@/views/statistics/order/statistics_day'),
        name: 'orderStatisticsDay',
        meta: {
          perms: ['GET /admin/p/statistics_ordersum_index'],
          title: 'Order_day_statistics',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'order_store_statistics_day',
        component: () => import('@/views/statistics/order/statistics_store_day'),
        name: 'orderStoreStatisticsDay',
        meta: {
          perms: ['GET /admin/p/statistics_storeorder_index'],
          title: 'Order_store_statistics',
          noCache: false
        }
      },
      {
        path: 'order_statistics_hour',
        component: () => import('@/views/statistics/order/statistics_hour'),
        name: 'orderStatisticsHour',
        meta: {
          perms: ['GET /admin/p/statistics_storeorder_hour'],
          title: 'Order_hour_statistics',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'order_statistics_day_detail',
        component: () => import('@/views/statistics/order/statistics_day_detail'),
        name: 'orderStatisticsDayDetail',
        meta: {
          perms: ['GET /admin/p/statistics_storeorder_index'],
          title: 'Order_day_statistics_detail',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'order_refund_statistics',
        component: () => import('@/views/statistics/order/refund_statistics'),
        name: 'orderRefundStatistics',
        meta: {
          title: '订单退款统计',
          perms: ['GET /admin/p/statistics_orderrefund_index'],
          noCache: false
        }
      },
      {
        path: 'order_agent_refund_statistics',
        component: () => import('@/views/statistics/order/agent_refund_statistics'),
        name: 'orderAgentRefundStatistics',
        meta: {
          title: '订单待退款统计',
          perms: ['GET /admin/p/statistics_orderagentrefund_index'],
          noCache: false
        }
      }
    ]
  },
  {
    path: '/message',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'notice',
    meta: {
      title: 'Notifications',
      icon: 'notice'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/message/list'),
        name: 'messageList',
        meta: {
          perms: ['GET /admin/p/message_message_index'],
          title: 'Notification_list',
          noCache: false
        }
      },
      {
        path: 'create',
        component: () => import('@/views/message/create'),
        name: 'messageCreate',
        meta: {
          perms: ['GET /admin/p/message_message_add'],
          title: 'Publish_notification',
          noCache: false
        },
        hidden: true
      }
    ]
  },
  {
    path: '/feedback',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'feedback',
    meta: {
      title: 'User_feedback',
      icon: 'feedback'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/feedback/list'),
        name: 'feedbackList',
        meta: {
          perms: ['GET /admin/p/feedback_feedback_index'],
          title: 'Feedback_list',
          noCache: false
        }
      }
    ]
  },
  {
    path: '/sys',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'sysManage',
    meta: {
      title: 'System_settings',
      icon: 'sysManage'
    },
    children: [
      {
        path: 'ad',
        component: () => import('@/views/promotion/ad'),
        name: 'Ad',
        meta: {
          perms: ['GET /admin/p/activity_normal_index'],
          title: 'Advertisememtn_management',
          noCache: false
        }
      },
      {
        path: 'scheduled',
        component: () => import('@/views/promotion/scheduled'),
        name: 'Scheduled',
        meta: {
          perms: ['GET /admin/p/activity_scheduled_index'],
          title: 'Scheduled_Task',
          noCache: false
        }
      },
      {
        path: 'scheduledLog',
        component: () => import('@/views/promotion/scheduledLog'),
        name: 'scheduledLog',
        meta: {
          perms: ['GET /admin/p/activity_scheduled_log_index'],
          title: 'Scheduled_Task_Log',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'messageTemplate',
        component: () => import('@/views/promotion/messageTemplate'),
        name: 'messageTemplate',
        meta: {
          perms: ['GET /admin/p/activity_message_template_index'],
          title: 'messageTemplate',
          noCache: false
        }
      },
      {
        path: 'admin',
        component: () => import('@/views/sys/admin/admin'),
        name: 'sysAdmin',
        meta: {
          perms: ['GET /admin/p/system_controllerlist_index'],
          title: 'Controller_list',
          noCache: false
        }
      },
      {
        path: 'admin/edit',
        component: () => import('@/views/sys/admin/edit'),
        name: 'sysAdminEdit',
        meta: {
          perms: ['GET /admin/p/system_controllerlist_edit'],
          title: 'Edit_controllers',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'admin/create',
        component: () => import('@/views/sys/admin/create'),
        name: 'sysAdminCreate',
        meta: {
          perms: ['GET /admin/p/system_controllerlist_add'],
          title: 'Add_controllers',
          noCache: false
        },
        hidden: true
      },
      {
        path: 'log',
        component: () => import('@/views/sys/log'),
        name: 'sysLog',
        meta: {
          perms: ['GET /admin/p/system_oplog_index'],
          title: 'Operating_Journals',
          noCache: false
        }
      },
      {
        path: 'role',
        component: () => import('@/views/sys/role'),
        name: 'Role',
        meta: {
          perms: ['GET /admin/p/system_role_index'],
          title: 'Roles_list',
          noCache: false
        }
      },
      {
        path: 'os',
        component: () => import('@/views/sys/os'),
        name: 'os',
        meta: {
          perms: ['GET /admin/p/system_objectstore_index'],
          title: 'Target_save',
          noCache: false
        }
      }
    ]
  },
  {
    path: '/config',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'configManage',
    meta: {
      title: '配置管理',
      icon: 'configManage'
    },
    children: [
      /*      {
              path: 'mall',
              component: () => import('@/views/config/mall'),
              name: 'configMall',
              meta: {
                perms: ['GET /admin/config/mall', 'POST /admin/config/mall'],
                title: '商场配置',
                noCache: false
              }
            },*/
      {
        path: 'posad',
        component: () => import('@/views/config/posad'),
        name: 'configPosad',
        meta: {
          perms: ['GET /admin/p/config_posad_index'],
          title: 'POS外屏广告设置',
          noCache: false
        }
      },
      {
        path: 'express',
        component: () => import('@/views/config/express'),
        name: 'configExpress',
        meta: {
          perms: ['GET /admin/p/config_freight_index'],
          title: '运费配置',
          noCache: false
        }
      },
      {
        path: 'order',
        component: () => import('@/views/config/order'),
        name: 'configOrder',
        meta: {
          perms: ['GET /admin/p/config_order_index'],
          title: '订单配置',
          noCache: false
        }
      },
      {
        path: 'amount',
        component: () => import('@/views/config/amount'),
        name: 'configAmount',
        meta: {
          perms: ['GET /admin/p/config_statamount_index'],
          title: '统计金额配置',
          noCache: false
        }
      },
      {
        path: 'payType',
        component: () => import('@/views/config/payType'),
        name: 'configPayType',
        meta: {
          perms: ['GET /admin/p/config_statamount_index'],
          title: '支付方式配置',
          noCache: false
        }
      },
      {
        path: 'settlement',
        component: () => import('@/views/config/settlement'),
        name: 'configSettlement',
        meta: {
          perms: ['GET /admin/p/config_settleamount_index'],
          title: '结算面额配置',
          noCache: false
        }
      },
      {
        path: 'tax',
        component: () => import('@/views/config/tax'),
        name: 'configTax',
        meta: {
          perms: ['GET /admin/p/config_tax_index'],
          title: '税费配置',
          noCache: false
        }
      },
      // {
      //   path: 'i18n',
      //   component: () => import('@/views/config/i18n'),
      //   name: 'configI18n',
      //   meta: {
      //     perms: ['GET /admin/i18n/list', 'POST /admin/i18n/create', , 'PUT /admin/i18n/update'],
      //     title: '国际化配置',
      //     noCache: false
      //   }
      // }
      /*{
        path: 'wx',
        component: () => import('@/views/config/wx'),
        name: 'configWx',
        meta: {
          perms: ['GET /admin/config/wx', 'POST /admin/config/wx'],
          title: '小程序配置',
          noCache: false
        }
      }*/
    ]
  },
   /*{
     path: '/connection',
     component: Layout,
     redirect: 'noredirect',
     alwaysShow: true,
     name: 'connectionManage',
     meta: {
       title: '连接池监控',
       icon: 'druid'
     },
    children: [
  //     /!*      {
  //       path: 'mall',
  //       component: () => import('@/views/config/mall'),
  //       name: 'configMall',
  //       meta: {
  //         perms: ['GET /admin/config/mall', 'POST /admin/config/mall'],
  //         title: '商场配置',
  //         noCache: false
  //       }
  //     },*!/
       {
         path: 'index',
         component: () => import('@/views/connection/index'),
         name: 'connectionIndex',
         meta: {
           perms: ['GET /admin/p/config_freight_index'],
           title: 'Druid数据库连接池监控',
           noCache: false
        }
       },
     ]
   },*/
  /*
    {
      path: '/stat',
      component: Layout,
      redirect: 'noredirect',
      alwaysShow: true,
      name: 'statManage',
      meta: {
        title: '统计报表',
        icon: 'chart'
      },
      children: [
        {
          path: 'user',
          component: () => import('@/views/stat/user'),
          name: 'statUser',
          meta: {
            perms: ['GET /admin/stat/user'],
            title: '用户统计',
            noCache: false
          }
        },
        {
          path: 'order',
          component: () => import('@/views/stat/order'),
          name: 'statOrder',
          meta: {
            perms: ['GET /admin/stat/order'],
            title: '订单统计',
            noCache: false
          }
        },
        {
          path: 'goods',
          component: () => import('@/views/stat/goods'),
          name: 'statGoods',
          meta: {
            perms: ['GET /admin/stat/goods'],
            title: '商品统计',
            noCache: false
          }
        }
      ]
    },*/
  /* {
    path: 'external-link',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'externalLink',
    meta: {
      title: '外链',
      icon: 'link'
    },
    children: [
      {
        path: 'https://cloud.tencent.com/product/cos',
        meta: { title: '腾讯云存储', icon: 'link' }
      },
      {
        path: 'https://cloud.tencent.com/product/sms',
        meta: { title: '腾讯云短信', icon: 'link' }
      },
      {
        path: 'https://pay.weixin.qq.com/index.php/core/home/login',
        meta: { title: '微信支付', icon: 'link' }
      },
      {
        path: 'https://mpkf.weixin.qq.com/',
        meta: { title: '小程序客服', icon: 'link' }
      },
      {
        path: 'https://www.alibabacloud.com/zh/product/oss',
        meta: { title: '阿里云存储', icon: 'link' }
      },
      {
        path: 'https://www.qiniu.com/products/kodo',
        meta: { title: '七牛云存储', icon: 'link' }
      },
      {
        path: 'http://www.kdniao.com/api-track',
        meta: { title: '快递鸟', icon: 'link' }
      }
    ]
  },*/
  {
    path: '/profile',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    children: [
      {
        path: 'password',
        component: () => import('@/views/profile/password'),
        name: 'ChangePassword',
        meta: { title: 'Personal Center', noCache: false }
      }
    ],
    hidden: true
  },

  { path: '*', redirect: '/404', hidden: true }
]
